home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / C Guide / Average_Module1 / smakefile < prev   
Makefile  |  1998-09-16  |  3KB  |  114 lines

  1.  
  2. # Makefile for a sample Opus 5 module
  3. # This is based on the structure of the real Opus makefile, but may be
  4. # adapted as you see fit
  5.  
  6. # Declare some variables, so we must not change multiple lines
  7. # Object files for this module
  8.  
  9. EXAMPLEOBJS   =  modinit.o ModuleEntry.o DOExchange.o buildinstrings.o
  10.  
  11. # You should always have the modinit.o on the first place. After this
  12. # there should be your file with the L_ModuleEntry() function. All other
  13. # may follow like you want...
  14.  
  15.  
  16. # Library-Name/-Version/-Revision
  17. # use only lowercase for the name of the module
  18.  
  19. MODULENAME    = doexchange.module
  20. EXAMPLEVER    = 56
  21. EXAMPLEREV    = 0
  22.  
  23.  
  24. # Compiler options
  25. CCOPTS =  noversion optimize 
  26.  
  27. # Linker options
  28. SLINKOPTS = noicons smallcode smalldata
  29.  
  30.  
  31. #######################################################################
  32.  
  33. # If you have "ALL" in the tooltypes of your "Build" icon, this objects
  34. # will be created...
  35.  
  36. ALL: includes/buildin.strings $(MODULENAME)
  37.  
  38. #######################################################################
  39.  
  40. # Note to the line starting with "lib" :
  41. # The last entry is an object library created by Dirk Stoecker. This
  42. # does supply some replacements for the string.h and some other stuff
  43. # (in conclusion with sdi_std.h)
  44. # This results in smaller code. It is your choice ...
  45. # If you don't want use it, delete "lib:sdi_std.lib", but you must
  46. # include instead the "string.h" (if you need their functions).
  47.  
  48. # Do not modify other stuff here !!!
  49.  
  50. $(MODULENAME): $(EXAMPLEOBJS) smakefile scoptions
  51.                slink with <<
  52. libprefix _L_
  53. libfd modules.fd
  54. from lib:libent.o lib:libinit.o $(EXAMPLEOBJS)
  55. to $@
  56. lib lib:sc.lib lib:amiga.lib lib:dopuslib.lib /sc/lib/sdi_std.lib
  57. libversion $(EXAMPLEVER)
  58. librevision $(EXAMPLEREV)
  59. $(SLINKOPTS)
  60. <
  61.  
  62. #######################################################################
  63.  
  64. # This will create the string file
  65.  
  66. buildinstrings.o : includes/buildin.strings
  67.                    setdate buildinstrings.c
  68.                    sc buildinstrings.c
  69. #
  70.  
  71. ModuleEntry.o: ModuleEntry.c includes/Project.h
  72.  
  73. #
  74.  
  75. DOExchange.o: DOExchange.c includes/DOExchange.h includes/Project.h includes/buildin.strings
  76.  
  77. #
  78.  
  79. modinit.o: modinit.c
  80.  
  81. #######################################################################
  82.  
  83. # Build what from what and how...
  84.  
  85. .c.o:
  86.              sc $(CCOPTS) $*.c
  87. .asm.o:
  88.              sc:c/asm -iASMINC: $*.asm
  89. .cd.strings:
  90.              catcomp descriptor=$*.cd cfile=$*.strings
  91.  
  92. #######################################################################
  93.  
  94. # Done only if the tooltype CLEAN is supplied ...
  95.  
  96. clean:
  97.          delete ~(\#?_strings).o quiet
  98.          copy *.module DOpus5:modules
  99.          setdate \#?.cd
  100.  
  101. #######################################################################
  102.  
  103. # My choice :-) (, but first "ALL" )
  104.  
  105. copy:
  106.         copy *.module DOpus5:modules
  107.         wait 5
  108.         avail flush
  109.  
  110. #######################################################################
  111.  
  112.  
  113.  
  114.